//
//  LightObj.swift
//  命令设计模式
//
//  Created by slience on 2019/11/13.
//  Copyright © 2019 shehuiren. All rights reserved.
//

import UIKit

class LightObj: NSObject,CommandProtocol {

    weak var receiver:Receiver?
            var paramter:CGFloat?
    init(receiver : Receiver,paramter : CGFloat) {
        super.init()
        
     
        self.receiver = receiver;
        
        self.paramter = paramter;
        
    }
    
    func execute() {
        
        self.receiver?.makeLighter(paramter: paramter!)
    }
    
    func rollBackExecute() {
        
        self.receiver?.makeDark(paramter: paramter!)
    }
}
